package com.xuhai.blog19.common.exception;

import lombok.Data;

/**
 * @Author PangJunjie
 * @Date 2023/2/6/006
 */
@Data
public class RTException extends RuntimeException {
    private Integer code = 500;
    private String msg;

    public RTException() {
        super();
        this.msg = "与服务器端口连接，请稍后再试...";
    }

    public RTException(String msg) {
        super(msg);
        this.msg = msg;
    }

    public RTException(String msg, Integer code) {
        super(msg);
        this.msg = msg;
        this.code = code;
    }

    public RTException(String msg, Throwable e) {
        super(msg, e);
        this.msg = msg;
    }

    public RTException(String msg, Integer code, Throwable e) {
        super(msg, e);
        this.msg = msg;
        this.code = code;
    }
}
